package com.zxx.javapattern.chainOfResponsibility.demo4;

public class SaleSecurityCheck extends SaleHandler {
    @Override
    public boolean sale(String user, String customer, SaleModel saleModel) {
        //进行权限校验
        if("小张".equals(user)){
            return successor.sale(user,customer,saleModel);
        }else{
            System.out.println("对不起,你没有保存销售信息的权限...");
            return false;
        }
    }
}
